{template 'include/header'}

<div class="container container-fill" style="background:url(<?php echo MODULE_URL;?>/template/mobile/img/share_bg.jpg);">

<div class="hd" style="background-size:100%;width:100%; box-sizing:border-box; border:none !important;">
    <div class="clear" style="height:300px;background:url(<?php echo MODULE_URL;?>/template/mobile/img/share_top.jpg) no-repeat center top;background-size:400px;">
    	<div style="text-align:center"><img src="{$users['mem_photo']}" style="margin:20px auto 0;width:120px;border-radius:60px;border-top-left:7px solid #b08c70;border-top-right:7px solid #b08c70;"/></div>
    	<div style="text-align:center;margin-top:10px;">
    		<p style="color:#b2330c;">{$users['mem_name']}邀您一起捐</p>
    		<p>“{$kouhao}”</p>
    	</div>
	</div>
</div>
     
    <div style="margin: 30px 10px 0; font-size:14px; color:#2b2b2b;">
    	<div style="text-align:center;margin-top:-49px;"><img src="<?php echo MODULE_URL;?>/template/mobile/img/share_mid.jpg" style="width:150px;z-index:100;"/></div>
    	<div class="" style="border:1px solid #9d9b9a;overflow:hidden;padding:90px 10px 10px;background:#fff;margin-top:-88px;border-radius:6px;">
    		<p style="color:#4c4542;margin-top:5px;text-align:center">捐款目标：<font style="color:#ff6a0e;">{$goal}</font>元</p>
    	</div>
		<div class="clear"></div>
    </div>
     <div style="margin: 30px 10px 10px; font-size:14px; color:#2b2b2b;border-radius:6px;">
        <div style="height:50px;line-height:50px;border:1px solid #9d9b9a;border-bottom:0px solid #9d9b9a;background:#fff;padding:0 10px;">捐助的项目  <p style="float:right">还需要募捐：<font style="color:#ff6a0e;">{php echo $project['pro_goal']-$fund_totals['total'];}</font>元</p></div>
        <div class="" style="border:1px solid #9d9b9a;padding:10px 10px;background:#fff;">
            <img src="{$_W['attachurl']}{$project['pro_feature']}" alt="" style="width: 100px;float:left;margin-right:20px;border-radius:5px"/>
            <h2 style="font-size:15px;margin:0;">{$project['pro_name']}</h2>
            <p style="color:#a5a09d;margin-top:5px;">{$project['pro_short']}</p>
            <div class="clear"></div>
        </div><br><br><br>
        <div class="clear"></div>
    </div>
   <div class="clear"></div>
   <div class="i_d_10" style="border-top:#ececec 1px solid;z-index:1000;">
        <?php if (time()>$project['starttime'] && time()<$project['endtime']) {?>
            <?php if (empty($_W['fans']['follow']) && $set['is_follow']==true) {?>
                <div class="i_d_10_1 btn btn-danger  btn-block" id="guanzhu" style="background:#f96352; border-color:#f96352; color:#fff;">
                    请点击关注并捐款
                </div>
            <?php}else{?>
                <div class="i_d_10_1 btn btn-danger  btn-block" id="wyjk" style="background:#f96352; border-color:#f96352; color:#fff;">
                    立即捐款
                </div>
            <?php}?>
        <?php}elseif(time()<$project['starttime']){?>
                <div class="i_d_10_1 btn btn-danger  btn-block" style="background:#f96352; border-color:#f96352; color:#fff;width:48%;float:left;">
                    捐款未开始
                </div>
        <?php}else{?>
                <div class="i_d_10_1 btn btn-danger  btn-block" style="background:#f96352; border-color:#f96352; color:#fff;width:48%;float:left;">
                    捐款已结束
                </div>
        <?php}?>
            <a href="<?php echo $this->createMobileUrl("invite",array("pro_id"=>$pro_id));?>" class="i_d_10_1 btn btn-danger btn-block" id="see_sort_btn" style="background-color:#fe6903; border-color:#fe6903; color:#fff;">
                邀请朋友一起捐
            </a>
            <div style="clear:both;"></div>
        
        </div>    
<!--金额弹窗-->
        <div class="jetc" id="day-donate" style="border-top:#ececec 1px solid; padding:10px 15px !important;z-index:1001;">
            <div class="float_l">
                <div class="input_2 input_val5"  style="position:relative;"><span class="font_2"><?php if($set['cash1']){echo $set['cash1'];}else{echo '5';} ?></span>元
                    <div style="position:absolute; right:0; bottom:0;" class="arrow-left"></div>
                    <div class="gou_b"><span class="glyphicon glyphicon-ok" aria-hidden="true"></span></div>
                </div>
            </div>
            <div class="float_l">
                <div class="input_2 input_val10"  style="position:relative;"><span class="font_2"><?php if($set['cash2']){echo $set['cash2'];}else{echo '10';} ?></span>元
                    <div style="position:absolute; right:0; bottom:0;" class="arrow-left"></div>
                    <div class="gou_b"><span class="glyphicon glyphicon-ok" aria-hidden="true"></span></div>
                </div>
            </div>
            <div class="float_l">
                <div class="input_2 input_val50"  style="position:relative;"><span class="font_2"><?php if($set['cash3']){echo $set['cash3'];}else{echo '50';} ?></span>元
                    <div style="position:absolute; right:0; bottom:0;" class="arrow-left"></div>
                    <div class="gou_b"><span class="glyphicon glyphicon-ok" aria-hidden="true"></span></div>
                </div>
            </div>
            <div class="float_l">
                <div class="input_2 input_val100"  style="position:relative;"><span class="font_2"><?php if($set['cash4']){echo $set['cash4'];}else{echo '100';} ?></span>元
                    <div style="position:absolute; right:0; bottom:0;" class="arrow-left"></div>
                    <div class="gou_b"><span class="glyphicon glyphicon-ok" aria-hidden="true"></span></div>
                </div>
            </div>

            <div class="float_l" style="width:100%;">
                <div class="input_1" style="position:relative;">
                    <input name="price" value="" size="6" class="price_input input_2 font_3" placeholder="输入金额，爱心无价" style="width:90%; padding:7px 30px 7px 10px; font-size:14px; color:#fe6903; "/>
                    <span style="display:inline-block; margin-left:-30px;font-size:12px; color:#939393;">元</span>
                </div>
                
                <a href="javascript:void(0)" id="price">
                    <span style="float:right;color:#fff; display:none;background:#fe6903 !important;">立即捐助<i class="glyphicon glyphicon-chevron-right"></i></span>
                </a>
            </div>  
            <label style="display:none;" id="jine"></label>
            <div class="clear"></div>
            <a href="###" id="jk_btn" >
                <div class="btn btn-danger  btn-block" style="background:#fe6903; border-color:#fe6903; color:#fff;">立即捐款</div>
            </a>
            <div class="has-success i_d_14">
                <div class="radio">
                    <label>
                        <input type="radio" id="checkboxSuccess" value="option1"  checked style=" margin-top:2px;">
                            同意并接受<a href="{php echo $this->createMobileUrl('agree')}">{$set['gy_agree_name']}</a>
                    </label>
                </div>
            </div>
        </div>
        <!--遮蔽层-->
        <div class="mask"></div>
   
<style type='text/css'>
	.sel { background:#33cdd6; color:#fff;}
	.nosel { background:#fff;color:#000}
</style>
<script type="text/javascript">
        $("#price").click(
            function(){
                var  price = $('.price_input').val();
                window.location.href = "{php echo $this->createMobileUrl('donate',array('pro_id'=>$project['pro_id']));}&price="+price;
         });
    </script>
<script>
$("#wyjk").click(
            function(){
                $("#day-donate").show();
                $(".mask").show();
            }
        );
        $("#wyyj").click(
            function(){
                $("#month-donate").show();
                $(".mask").show();
            }
        );
        $("#yao_btn").click(
            function(){
                $(".chuandi").show();
                $(".mask").show();
            }
        );
        $("#guanzhu").click(
            function(){
                window.location.href = "{$set['follow_url']}";
            }
        );
        $(".mask").click(
            function(){
                $(".jetc").hide();
                $(".mask").hide();
                $('.price_input').val("");
             }
        );
        $(".input_2").click(
            function(){
                $(".input_2").css("border-color","#ccc"); 
                $(".input_2").css("border-width","1px");
                $(this).css("border-color","#fe6903");
                $(this).css("border-width","2px");
                $(".input_2").find(".arrow-left").hide();
                $(".input_2").find(".gou_b").hide();
                $(this).find(".arrow-left").show();
                $(this).find(".gou_b").show();
                $("#price_input").val("");
            }
        );
        $(".input_val5").click(
            function(){             	
                $(".price_input").val($(this).find('.font_2').html());
            }
        );
        $(".input_val10").click(
            function(){ 
                $(".price_input").val($(this).find('.font_2').html());
            }
        );
        $(".input_val50").click(
            function(){ 
                $(".price_input").val($(this).find('.font_2').html());
            }
        );
        $(".input_val100").click(
            function(){ 
                $(".price_input").val($(this).find('.font_2').html());
            }
        );
        $("#jk_btn").click(
            function(){
                if(parseFloat($(".price_input").val())>0){
                    $("#price").click();
                } else {
                    alert("还是捐点吧，爱心无价！");
                }
            }
        );  
        $("#yj_btn").click(
            function(){
                if(parseFloat($("#price-input").val())>0){
                    var  price = $('#price-input').val();
                    window.location.href = "{php echo $this->createMobileUrl('donate',array('pro_id'=>$project['pro_id']));}&ch=month&price="+price;
                } else {
                    alert("还是捐点吧，爱心无价！");
                }
            }
        );        
    </script>

<script src="https://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>

<!--底部logo和版权-->

{php echo register_jssdk(false);}
<script type="text/javascript">
    initShare();
    function initShare(){
        wx.ready(function () {
            sharedata = {
                title: "{$project['pro_name']}",
                desc: "{php echo trim($kouhao);}",
                link: "{php echo $_W['siteroot'].'app/'.$this->createMobileUrl('per', array('pro_id'=>$project['pro_id']));}",
                imgUrl: "{$_W['attachurl']}{$project['pro_feature']}",
                success: function(){

                },
                cancel: function(){
                    //alert("分享失败，可能是网络问题，一会儿再试试？");
                }
            };
           
            wx.onMenuShareAppMessage(sharedata);
            wx.onMenuShareTimeline(sharedata);
        });
    }
</script>
            
</body>
</html>
